import {
  createBrowserRouter,
} from "react-router-dom";
import { lazy } from "react";
let Home = lazy(()=>import("../views/Home/Home"))
let Trainlist = lazy(()=>import("../views/Trainlist/Trainlist"))
let Citylist = lazy(()=>import("../views/Citylist/Citylist"))
let My = lazy(()=>import("../views/My/My"))
let Message = lazy(()=>import("../views/Message/Messages"))

const routes = [
  {
    path: "/",
    element: <Home/>,
  },
  {
    path:"/trainlist",
    element: <Trainlist/>
  },
  {
    path:"/citylist",
    element: <Citylist/>
  },
  {
    path:"/my",
    element: <My/>
  },
  {
    path:"/message",
    element: <Message/>
  }
]

const router = createBrowserRouter(routes);
export default router;